﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microsoft.JCI.Common.Utility
{
    public class Enumerator
    {
        #region WebSite Error Type

        public enum ErrorType
        {
            /// <summary>
            /// 系统错误
            /// </summary>
            [EnumeratorHelper("系统错误，请与系统管理员联系！")]
            SystemError,
            /// <summary>
            /// 无权限
            /// </summary>
            [EnumeratorHelper("对不起，您无此功能权限！")]
            NoRight,
            /// <summary>
            /// 写日志失败
            /// </summary>
            [EnumeratorHelper("写日志失败！")]
            LogError,
            /// <summary>
            /// Session失效
            /// </summary>
            [EnumeratorHelper("会话状态失效，请重新登陆！")]
            SessionAbandon,
        }

        #endregion

        #region 客户类型
        public enum CustomerType
        {
            [EnumeratorHelper("个人客户")]
            Personal = 0,
            [EnumeratorHelper("公司客户")]
            Company = 1,
            [EnumeratorHelper("楼盘")]
            Building = 2
        }
        #endregion

        #region 字典类型
        public enum DictionaryType
        {
            Area = 0,

            Province = 2,

            City = 3,
            /// <summary>
            /// 报修来源
            /// </summary>
            MaintainIssueSource = 4,
            /// <summary>
            /// 产品分类
            /// </summary>
            ProductCategory = 5,
            /// <summary>
            /// 制冷类型
            /// </summary>
            RefrigerationType = 6,
            /// <summary>
            /// 产品等级
            /// </summary>
            ProductLevel = 7,
            /// <summary>
            /// 工作单性质
            /// </summary>
            WorkFormProperty = 8,

            /// <summary>
            /// 产品品牌
            /// </summary>
            ProductBrand = 9,

            /// <summary>
            /// 维修类型
            /// </summary>
            MaintainType=10
        }
        #endregion

        #region 来电类型(单据类型)
        /// <summary>
        /// 来电类型
        /// </summary>
        public enum FormCategory
        {
            [EnumeratorHelper("报修")]
            Maintain = 0,
            [EnumeratorHelper("投诉")]
            Complaint = 1,
            [EnumeratorHelper("咨询")]
            Advisory = 2
        }
        #endregion


        #region 公司类别 Company表
        public enum CompanyType
        {
            //呼叫中心
            [EnumeratorHelper("呼叫中心")]
            CallCenter = 0,
            //办事处
            [EnumeratorHelper("办事处")]
            Branch = 1,
            //供应商
            [EnumeratorHelper("供应商")]
            Vendor = 2
        }
        #endregion

        #region 用户等级 User表
        public enum UserLevel
        {
            Employee = 0,

            Manager = 1,

            Boss = 2
        }
        #endregion


        #region 工单表状态
        /// <summary>
        /// 工单状态，
        /// -1 废单
        /// 0 已经填写，未派出
        /// 1 已经派出
        /// 2 供应商处理完成
        /// 3 总部回访完成         
        /// </summary>
        public enum FormStatus
        {
            [EnumeratorHelper("已作废")]
            Nullify = -1,
            [EnumeratorHelper("草稿")]
            Draft = 0,
            [EnumeratorHelper("已派工")]
            Dispatched = 1,
            [EnumeratorHelper("已完成")]
            Closed = 2,
            [EnumeratorHelper("已回访")]
            Visited = 3,
            [EnumeratorHelper("已批量回访")]
            BatchVisited = 4,
        }

        /// <summary>
        /// 工单派遣状态
        /// 0 未派遣
        /// 1 派到办事处
        /// 2 派到供应商
        /// 3 供应商接受
        /// </summary>
        public enum DispatchStatus
        { 
            None = 0,
            DispatchedBranch = 1,
            BranchAccecpt =2,
            DispatchedVendor = 3,
            VendorAccecpt = 4
        }
        #endregion

        #region 工作单类型

        public enum WorkType
        { 
            /// <summary>
            /// 开机调试工作单
            /// </summary>
            [EnumeratorHelper("开机调试工作单")]
            BootDebugging = 0,
            /// <summary>
            /// 保内保外工作单
            /// </summary>
            [EnumeratorHelper("保内保外工作单")]
            Maintenance = 1
        }
        #endregion
 
    }
}
